package com.zijin.Dao;

import com.zijin.entity.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmpMapper {
    @Select("select empid,name,zhiwei,time,salary from emp where empid=#{empid}")
    Emp selectEmpByEmpid(int empid);

    @Select("select empid,name,zhiwei,time,salary from emp where deptid=#{deptid}")
    List<Emp> selectAllEmp(int deptid);

    @Insert("insert into emp(empid,name,zhiwei) values (#{empid},#{name},#{zhiwei})")
    int insertEmp(Emp emp);
}
